<html>
<head>
	<meta charset="utf-8">
	<title>我的电商系统</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="__PUBLIC__/Nivo/nivo-slider.css"/>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/fornt.css">
</head>
<body>
<include file="./Application/Home/View/header.php" />
<div class="container">
	<div class="row banner clearfix">
	<!--*********************左边菜单栏的显示************************-->
		<div class="col-md-3 banner_left">
			<ul class="list-group pull-left">
				<li id="list1" class="list-group-item title"><a href=""><i class="glyphicon glyphicon-th-list"></i>所有分类</a></li>
				<?php foreach($catalogs as $catalog){?>
				<li id='list2' class="list-group-item"><a href="<?php echo U('home/Product/lists').'/catalog_id/'.$catalog['id']?>"><?php echo $catalog['name'];?></a></li>
				<?php }?>
			</ul>
		</div>
<!--***************************轮播图的显示*******************-->
		<div class="col-md-9 banner_right pull-right">
			<div class="slider-wrapper theme-default">
	            <div id="slider" class="nivoSlider">
	                <img style="height:560px" src="__PUBLIC__/img/slider1.jpg" />
	                <img style="height:560px" src="__PUBLIC__/img/slider2.jpg" />
	                <img style="height:560px" src="__PUBLIC__/img/slider3.jpg" />
	                <img style="height:560px" src="__PUBLIC__/img/slider4.jpg" />
	            </div>
	        </div>
		</div>
	</div>
<!--*************************产品及新闻公告*************************************-->
	<div class="row">
		<div class="col-md-8 main1" style="padding-left:0px">
			<?php foreach($products as $p){?>

			<div class="col-md-6 main_frist" style="margin-top:10px">
				<img class="pull-left" style="width:150px;height:150px" src="__ROOT__/<?php echo $p['img'];?>" >
				<div class="clearfix" style="margin-top:25px;">
					<a href="<?php echo U('home/Product/detail').'/id/'.$p['id'];?>"><p class="item_title"><?php echo $p['title'];?></p></a>
					<p class="item_desc"><?php echo $p['desc'];?></p>
					<p><span class="price1" style="color:red">￥<?php echo $p['price'];?></span><span class="btn btn-danger btn-sm nowbuy pull-right">立即抢购</span></p>
				</div>
			</div>
			<?php }?>
		</div>
			<div class="col-md-4 main_header" style="background:url('http://placehold.it/200x200?text=广告');margin-top:10px">
			</div>
			<div class="col-md-4 main_header note_new" style="margin-top:10px">
				<ul class="nav nav-tabs nav-justified" role="tablist">
				    <li role="presentation" class="active"><a href="#notes"  role="tab" data-toggle="tab">公告</a></li>
				    <li role="presentation"><a href="#new" role="tab" data-toggle="tab">新闻</a></li>
				</ul>
				  <div class="tab-content">
				    <div role="tabpanel" class="tab-pane active" id="notes">
				    	<ul>
				    	<?php foreach($notes as $note){?>
				    		<li><a href="#"><?php echo $note['title'];?></a></li>
				    	<?php }?>	
				    	</ul>
				    </div>
				    <div role="tabpanel" class="tab-pane" id="new">
						<ul>
				    	<?php foreach($news as $new){?>
				    		<li><a href="#"><?php echo $new['title'];?></a></li>
				    	<?php }?>	
				    	</ul>
				    </div>
				 </div>
			</div>
	</div>
<!--**********************************产品的楼层显示****************************-->
	<?php 
		$catalog_ids=array(100,130);
		$i=1;
		foreach($catalog_ids as $catalog_id){
			$f_recommend=M("product")->where('catalog_id='.$catalog_id. ' and recommend=1')->limit(1)->select();
			$f_recommend=$f_recommend[0];
			$f_no_recommends=M("product")->where('catalog_id='.$catalog_id. ' and recommend=0')->limit(6)->select();
			$catalog=M('product_catalog')->where('id='.$i)->select();
			$catalog=$catalog[0];
	?>
	<br />
	<p class="floor"><span ><?php echo $i;?>f</span><?php echo $catalog['name'];?></p>
	<div class="row">
		<div class=" main clearfix">
			<div class="first">
				<img style="width:180px;height:180px;margin-top:10px" src="__ROOT__/<?php echo $f_recommend['img'];?>">
				<a href="<?php echo U('home/product/detail').'/id/'.$f_recommend['id'];?>"><p class="item1_title"><?php echo $f_recommend['title'];?></p></a>
				<p class="item1_desc"><?php echo $f_recommend['desc'];?></p>
				<p><span class="price">￥<?php echo $f_recommend['price']?></span><span class="btn btn-danger btn-sm now_buy">立即抢购</span></p>
			</div>
			<?php foreach($f_no_recommends as $f){?>
			<div class="item1">
					<img  style="width:120px;height:120px;margin-top:10px" src="__ROOT__/<?php echo $f['img'];?>">
					<a href="<?php echo U('home/product/detail').'/id/'.$f['id'];?>"><p class="item1_title"><?php echo $f['title'];?></p></a>
					<p><span class="price">￥<?php echo $f['price'];?></span></p>
			</div>
			<?php }?>
		</div>
	</div>
	<?php 
		$i++;}
	?>
<!--************************底部链接******************************-->
	<hr/>
	<div class="links clearfix">
		<ul>
			<li><a href="#">帮助中心</a></li>
			<li><a href="#">购物指南</a></li>
			<li><a href="#">配送方式</a></li>
			<li><a href="#">支付方式</a></li>
		</ul>
		<ul>
			<li><a href="#">技术支持</a></li>
			<li><a href="#">售后网点</a></li>
			<li><a href="#">常见问题</a></li>
		</ul>
		<ul>
			<li><a href="#">关于商城</a></li>
			<li><a href="#">公司介绍</a></li>
			<li><a href="#">商城简介</a></li>
			<li><a href="#">联系客服</a></li>
		</ul>
		<ul>
			<li><a href="#">关注我们</a></li>
			<li><a href="#">商城手机版</a></li>
		</ul>
		<ul>
			<li><a href="#">售后服务</a></li>
			<li><a href="#">保修政策</a></li>
			<li><a href="#">退换货政策</a></li>
			<li><a href="#">退换货流程</a></li>
		</ul>
	</div>
	<hr/>
</div>

	<div class="footer">
		<p>未经goodjobs.cn同意，不得转载网站之所有招聘信息及作品 新安人才网版权所有&copy;2000-2016
		<br>皖ICP备12018891号 经营许可证：皖B2-20080016</p>
	</div>
</body>
	<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Nivo/jquery.nivo.slider.js"></script>
    <script type="text/javascript">
    $(function(){
        $('#slider').nivoSlider({
        	prevText: '<i class="glyphicon glyphicon-menu-left"></i>',       
    		nextText: '<i class="glyphicon glyphicon-menu-right"></i>',
        });
    });
    </script>
</html>